<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%
request.setCharacterEncoding("GB2312");
%>
<jsp:useBean id="reg" scope="page" class="dsp.web.User"/>
<%
reg.setUsername(String.valueOf(session.getAttribute("username")));
String pwd = request.getParameter("password");
%>
<jsp:setProperty name="reg" property="homepage" param="homepage"/>
<jsp:setProperty name="reg" property="oicq" param="oicq"/>
<jsp:setProperty name="reg" property="email" param="email"/>
<jsp:setProperty name="reg" property="head" param="head"/>
<jsp:setProperty name="reg" property="name" param="name"/>
<jsp:setProperty name="reg" property="sex" param="sex"/>
<jsp:setProperty name="reg" property="birthday" param="birthday"/>
<jsp:setProperty name="reg" property="province" param="province"/>
<jsp:setProperty name="reg" property="city" param="city"/>
<jsp:setProperty name="reg" property="address" param="address"/>
<jsp:setProperty name="reg" property="tel" param="tel"/>
<jsp:setProperty name="reg" property="profession" param="profession"/>
<jsp:setProperty name="reg" property="wedding" param="wedding"/>
<jsp:setProperty name="reg" property="education" param="education"/>
<jsp:setProperty name="reg" property="graduation" param="graduation"/>
<jsp:setProperty name="reg" property="introduce" param="introduce"/>
<%
reg.modUser(pwd);

if(reg.isStatus()){
	response.sendRedirect("userinfo.jsp?username="+String.valueOf(session.getAttribute("username")));
}
else{
	out.println("<script language=javascript> alert('"+ reg.getMsg() + "'); location.href='modify.jsp';</script>");	
}
%>